home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / apps / 93 / applic / tiny.doc < prev    next >
Text File  |  1987-01-15  |  2KB  |  53 lines

  1.             Tiny Stuff and Tiny View
  2.             by David Mumper
  3.             ST Picture Compression
  4.  
  5.  
  6.      Here is the file format for a Tiny compacted file:
  7.  
  8.       1 byte that tells which resolution and if there is rotation information
  9.  
  10.         (if there is rotation information it is stored as follows:
  11.  
  12.          1 byte for the start and end color to rotate (start is high 4 bits
  13.            end is low 4 bits)
  14.  
  15.          1 byte for direction and speed of rotation (negative for left
  16.            rotation, positive for right; actual number is the number of
  17.            vertical blank interrupts to wait between each rotation)
  18.  
  19.          2 bytes for the number of revolutions to make)
  20.  
  21.       2 bytes that tell how many control bytes there are
  22.  
  23.       2 bytes that tell how many data bytes there are
  24.  
  25.      32 bytes that contain the color palette for the picture
  26.  
  27. 3-10667 control bytes
  28.  
  29. 2-32000 data bytes
  30.  
  31. -------
  32. 42/32044 minimum/maximum size
  33.  
  34.      The screen is scanned column by column, plane by plane (assuming low res
  35. format) as the program does the compaction.
  36.      If there is rotation information, the resolution value has 3 added to it
  37. to signify this.
  38.  
  39.      Control bytes are interpreted as follows:
  40.  
  41.      x<0 -- 1-127 unique words are taken from the data section
  42.  
  43.      x=0 -- two more words are taken from the control section that are a value
  44.             (128-32767) which is the number of times to repeat the next data
  45.             word
  46.  
  47.      x=1 -- two more bytes are taken from the control section that are a value
  48.             (128-32767) which is the numberof unique words to take from data
  49.             section
  50.  
  51.      x>1 -- one byte of repetitive information is taken from data section and
  52.             repeated 2-127 times
  53.